﻿@using Library
@model Ecommerce.Models.ProductViewModel

@{
    var modelCulture = Model.ProductCultures.SingleOrDefault(i => i.Culture == NOWCulture.CurrentCulture) ?? Model.ProductCultures.First();
    var brandCulture = Model.Brand.BrandCultures.SingleOrDefault(i => i.Culture == NOWCulture.CurrentCulture) ?? Model.Brand.BrandCultures.First();
}
<a class="col-lg-3 col-md-3 col-sm-6 col-xs-12" title="@modelCulture.Name" href="/@Model.Url">
    @if (Model.Avatar == null || string.IsNullOrEmpty(Model.Avatar.Src))
    {
        <div class="default-avatar">?</div>
    }
    else
    {
        <img width="200" height="200" src="@Model.Avatar.Src" alt="@Model.Avatar.AltText" />
    }
    <span class="brand">@brandCulture.Name.ToUpper()</span>
    <sup class="s-price pull-right">@Model.StrikethroughPriceDisplay@Settings.DefaultCurrency</sup>
    <span class="price pull-right">@Model.PriceDisplay@Settings.DefaultCurrency</span>
    <h3>@modelCulture.Name</h3>
    <span class="promo">@Html.Raw(modelCulture.PromotionCaption)</span>
</a>   